package org.example.common.core.constants;

/**
 * 通用常量信息
 *
 * @author ruoyi
 */
public interface Constants {

    /**
     * UTF-8 字符集
     */
    String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    String GBK = "GBK";

    /**
     * www主域
     */
    String WWW = "www.";

    /**
     * http请求
     */
    String HTTP = "http://";

    /**
     * https请求
     */
    String HTTPS = "https://";

    /**
     * 通用成功标识
     */
    String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    String FAIL = "1";

    /**
     * 登录成功
     */
    String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    String LOGOUT = "Logout";

    /**
     * 注册
     */
    String REGISTER = "Register";

    /**
     * 登录失败
     */
    String LOGIN_FAIL = "Error";

    /**
     * 验证码有效期（分钟）
     */
    Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    String TOKEN = "token";
    String UUID = "uuid";
    String GRANT_USER = "grant_user";
    String DEVICE_TYPE = "device_type";
    String EXPIRES_IN = "expires_in";
    String TENANT_ID = "tenant_id";

    Integer ACCESS_TOKEN_VALIDITY_SECONDS = 1000*60*60*2;
    Integer REFRESH_TOKEN_VALIDITY_SECONDS = 1000*60*60*24*3;

    /**
     * 令牌自定义标识
     */
    String HEADER = "Authorization";
    /**
     * 令牌前缀
     */
    String TOKEN_PREFIX = "Bearer ";
    /**
     * 令牌自定义标识
     */
    String AUTHORIZATION_TOKEN_HEADER = "token";
    /**
     * 顶级部门id
     */
    Long TOP_PARENT_ID = 0L;

    /**
     * 平台用户
     */
     String SYSTEM = "system";
    /**
     * 移动端用户
     */
     String MOBILE = "mobile";
    /**
     * 客户端用户
     */
    String CLIENT = "client";

}

